import axios from '@/utils/request'
const base = '/shopmovie'

export function saveCoupon(data) {
  return axios({
    url: `${base}/couponDefinitions`,
    method: 'post',
    data
  })
}

export function modifyCoupon(id, data) {
  return axios({
    url: `${base}/couponDefinitions/` + id,
    method: 'put',
    data
  })
}

export function listCoupon(params) {
  return axios({
    url: `${base}/couponDefinitions`,
    method: 'get',
    params: params
  })
}

export function deleteCoupon(id) {
  return axios({
    url: `${base}/couponDefinitions/` + id,
    method: 'delete'
  })
}
